package com.ruoyi.system.api;


import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.api.domain.SysUser;
import com.ruoyi.system.api.domain.SysUserRole;
import com.ruoyi.system.api.factory.RemoteSysUserFallbackFactory;
import com.ruoyi.system.api.factory.RemoteUserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(contextId = "remoteSysUserService", value = "ruoyi-carService-user"
        , fallbackFactory = RemoteSysUserFallbackFactory.class)
public interface RemoteSysUserService {
    @PostMapping("/users/add")
    public AjaxResult add(@RequestBody SysUser sysUser);

    @PostMapping("/userRole/add")
    public R add(@RequestBody SysUserRole sysUserRole);


    @GetMapping("/users/getUserByphone")
    public SysUser getUserByphone(@RequestParam("phonenumber") String phonenumber);

}
